using System;
using System.Data;
using System.Data.SqlClient;
using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;

namespace ASPNETVN.PORTAL.Components.Security
{
    public partial class Function
    {
        public static DataSet SelectBy_GeneralModuleDefinitionID(Guid guid)
        {
            string spName = "t_SYSTEM_Function_SelectBy_GeneralModuleDefinitionID";
            SqlDatabase db = (SqlDatabase) DatabaseFactory.CreateDatabase();
            SqlCommand dbCommand = (SqlCommand) db.GetStoredProcCommand(spName);
            db.AddInParameter(dbCommand, "@GUID", SqlDbType.UniqueIdentifier, guid);
            return db.ExecuteDataSet(dbCommand);
        }

        public static DataSet SelectBy_GeneralModuleDefinitionID(string guid)
        {
            return SelectBy_GeneralModuleDefinitionID(new Guid(guid));
        }
    }
}